"""Escape codes
"""

from re_test_patterns import test_patterns

test_patterns(
    'A prime #1 example!',
    [(r'\d+', 'sequence of digits'),
     (r'\D+', 'sequence of non-digits'),
     (r'\s+', 'sequence of whitespace'),
     (r'\S+', 'sequence of non-whitespace'),
     (r'\w+', 'alphanumeric characters'),
     (r'\W+', 'non-alphanumeric')],
)

test_patterns(
    'asfda13322126868abad',
    [
        (r"1\d{10}", "匹配手机号")
    ]
)

test_patterns(
    'asfda03322126868abad',
    [
        (r"0\d{10}", "匹配电话")
    ]
)

test_patterns(
    'asfda03322126868abad',
    [
        (r"[01]\d{10}", "匹配手机或者电话")
    ]
)
